package com.dyna.demo.excel.service;

import com.dyna.demo.excel.domain.dto.Student;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface ExcelService {

    /**
     * 导出excel
     * @param result result
     */
    void exportByTemplate(String result);

    /**
     * 不使用模板导出excel
     * @param response response
     */
    void exportByStream(HttpServletResponse response);

    /**
     * 读取excel数据
     * @param file excel
     * @return List<Student>
     */
    List<Student> readExcel(MultipartFile file);

    /**
     * 合并单元格
     * @param response  response
     */
    void merge(HttpServletResponse response);

}
